/******************************
mutex
cond
time_wait

******************************/

#ifndef _MTHREADCOND_H_
#define _MTHREADCOND_H_
#include <pthread.h>
#include <unistd.h>
#include <sys/time.h>

class m_cond{

private:
	pthread_mutex_t mutex;
	pthread_cond_t cond;
public:
	m_cond();
	void lock();//lock the mutex
	void unlock();//unlock the mutex
	void wait();//wait the signal
	bool timewaitms(long ms);//wait msec time
	void signal();//send the signal
};

#endif//_MTHREADCOND_H_
